package com.woniu.outlet.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.woniu.intlet.web.jsr303.PurchasePoJsr;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
public class PurchasePo {
    @ApiModelProperty(value = "采购单id")
    private Long id;
    @ApiModelProperty(value = "采购单编号")
    private Long purchaseNo;
    @ApiModelProperty(value = "客户编号")
    @NotNull(message = "客户编号不能为空",groups = {PurchasePoJsr.class})
    private Integer customerId;
    @ApiModelProperty(value = "供货联系人")
    @NotNull(message = "供货联系人不能为空",groups = {PurchasePoJsr.class})
    private String customerPerson;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "交货日期")
    @NotNull(message = "交货日期不能为空",groups = {PurchasePoJsr.class})
    private Date deliveryDate;
    @ApiModelProperty(value = "联系电话")
    @NotNull(message = "联系电话不能为空",groups = {PurchasePoJsr.class})
    private String telephone;
    @ApiModelProperty(value = "运输方式")
    @NotNull(message = "运输方式不能为空",groups = {PurchasePoJsr.class})
    private String shipping;
    @ApiModelProperty(value = "收获地址")
    @NotNull(message = "收获地址不能为空",groups = {PurchasePoJsr.class})
    private String address;
    @ApiModelProperty(value = "备注",dataType = "string")
    private String remarks;
    @ApiModelProperty(value = "采购单状态")
    private String status;
    @ApiModelProperty(value = "备用")
    private String spare3;
    @ApiModelProperty(value = "备用")
    private String spare1;
    @ApiModelProperty(value = "备用")
    private String spare2;
    @ApiModelProperty(value = "审核时间")
    private Date auditTime;
    private String audit;
    @ApiModelProperty(value = "审核人")
    private String reviewer;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "创建人")
    private String createPerson;
    @ApiModelProperty(value = "修改时间")
    private Date fixTime;
    @ApiModelProperty(value = "修改人")
    private String fixPerson;
    @ApiModelProperty(value = "预计用时")
    private Integer estimateTime;
    @ApiModelProperty(value = "实际用时")
    private Integer actualTime;
    @ApiModelProperty(value = "结算方式")
    private String settlementMethond;
    @ApiModelProperty(value = "订单含税金额")
    private BigDecimal trueTotal;
    private BigDecimal total;
}